<?php
namespace app\common\validate\Product;

use think\Validate;

// 商品单位的验证器
class Unit extends Validate
{
    protected $rule =   [
        'name'  => ['require','unique:product_unit'],
    ];

    protected $message  =   [
        'name.require' => '单位名称必须填写',
        'name.unique' => '单位必须唯一'
    ];
}
